﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WebApplication1
{
    public partial class About : System.Web.UI.Page
    {
        public string strAboutContent
        {
            get;
            set;
        }
        public string strTitle
        {
            get;
            set;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["title"] == null)
            {
                Response.Write("<script>alert('请选择欲浏览的相关信息');location.href='Search.aspx';</script>");
                return;
            }
            if (!IsPostBack)
            {
                string title = Request.QueryString["title"].ToString();
                DataTable dt = new DataTable();
                SQLHelper.getAboutInfoByTitle(title, out dt);
                strTitle = title;
                strAboutContent = dt.Rows[0]["AboutContent"].ToString();
                Page.DataBind();
            }
        }
    }
}
